/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'
// 处理多级菜单
import MultilevelParentView from '@/components/MultilevelParentView'

const systemRouter = {
  path: '/sys'
  , component: Layout
  , redirect: '/sys/admin'
  , name: 'System'
  , meta: {
    title: '系统管理'
    , icon: 'el-icon-s-tools'
  }
  , children: [
    {
      path: 'admin'
      , component: () => import('@/views/sys/admin/list')
      , name: 'Admin'
      , meta: { title: '用户管理', icon: 'user' }
    }
    , {
      path: 'role'
      , component: () => import('@/views/sys/role/index')
      , name: 'Role'
      , meta: { title: '角色管理', icon: 'peoples' }
    }
    , {
      path: 'menu'
      , component: () => import('@/views/sys/menu/index')
      , name: 'Menu'
      , meta: { title: '菜单管理', icon: 'tree-table' }
    }
    , {
      path: 'dept'
      , component: () => import('@/views/sys/dept/index')
      , name: 'Dept'
      , meta: { title: '部门管理', icon: 'tree' }
    }
    , {
      path: 'notice'
      , component: () => import('@/views/table/complex-table')
      , name: 'Notice'
      , meta: { title: '通知公告', icon: 'el-icon-s-comment' }
    }
    , {
      path: 'logs'
      , component: MultilevelParentView
      , name: 'Logs'
      , meta: { title: '日志管理', icon: 'log' }
      , redirect: '/sys/logs/operation'
      , children: [
        {
          path: 'operation'
          , component: () => import('@/views/logs/operation')
          , name: 'Operation'
          , meta: { title: '操作日志', icon: 'form' }
        }
        , {
          path: 'logininfor'
          , component: () => import('@/views/logs/logininfor')
          , name: 'Logininfor'
          , meta: { title: '登录日志', icon: 'logininfor' }
        }
      ]
    }
  ]
}
export default systemRouter
